package com.jrew.gae.util;

import java.util.Random;

/**
 * @author Vadim
 *
 */
public class RandomPassword {
	
	private static final String charset = "!0123456789abcdefghijklmnopqrstuvwxyz";
	private static final int DEFAULT_LENGTH = 10; 
	
    /**
     * @return
     */
    public static String getRandomString() {
        Random rand = new Random(System.currentTimeMillis());
        StringBuffer sb = new StringBuffer();
        for (int i = 0; i < DEFAULT_LENGTH; i++) {
            int pos = rand.nextInt(charset.length());
            sb.append(charset.charAt(pos));
        }
        return sb.toString();
    }
	
}
